
setlocal enabledelayedexpansion  
  
@REM 替换为你要操作的目录路径  
set "target_dir=LastRes"  
  
@REM @echo off  
@REM setlocal enabledelayedexpansion  
  
@REM set "target_dir=C:\path\to\test"  REM 替换为你要操作的目录路径  
  
for /r "%target_dir%" %%a in (.) do (  
    set "folder_name=%%~nxa"  
    if "!folder_name!"=="base" (  
        echo Deleting folder: !folder_name!   : %%a 
        rd /s /q "%%a"
    )  
)  
  
endlocal